﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;

namespace MailClient.Handlers
{
    /// <summary>
    /// replies to incmoing mail.  This should only reply to known mail commands.
    /// </summary>
    class reply
    {
        protected string RemoveReply(string Subject)
        {
            if (Subject.StartsWith("RE:", StringComparison.OrdinalIgnoreCase))
            { Subject = Subject.Remove(0, 3).Trim(); }
            if (Subject.StartsWith("FW:", StringComparison.OrdinalIgnoreCase))
            { Subject = Subject.Remove(0, 3).Trim(); }
            if (Subject.StartsWith("FWD:", StringComparison.OrdinalIgnoreCase))
            { Subject = Subject.Remove(0, 4).Trim(); }
            return Subject;
        }
    }
}
